
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="stylesheet" href="../assets/css/layui.css">
    <link rel="stylesheet" href="../assets/css/view.css"/>
    <title></title>
</head>
<body class="layui-view-body">
<div class="layui-content">
    <div class="layui-row">
        <div class="layui-card">
            <div class="layui-card-header">添加书籍</div>
            <form class="layui-form layui-card-body" action="doAddBook.jsp">
                <div class="layui-form-item">
                    <label class="layui-form-label" >书籍名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="bookname" required  lay-verify="required" placeholder="请输入书名" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">图书号ISBN</label>
                    <div class="layui-input-block">
                        <input type="text" name="isbn" required  lay-verify="required" placeholder="请输入书号" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">作者名称</label>
                    <div class="layui-input-inline">
                        <input type="text" name="author" required lay-verify="required" placeholder="请输入作者名" autocomplete="off" class="layui-input">
                    </div>

                    <label class="layui-form-label">书籍价格</label>
                    <div class="layui-input-inline">
                        <input type="text" name="price" required lay-verify="required" placeholder="请输入书本价钱" autocomplete="off" class="layui-input">
                    </div>
                </div>

                 <div class="layui-form-item">


                         <label class="layui-form-label">出版社</label>
                         <div class="layui-input-inline">
                             <input type="text"  name="publish" class="layui-input" id="test4" placeholder="输入出版社">
                         </div>

                     <label class="layui-form-label">出版日期</label>
                     <div class="layui-input-inline">
                         <input type="text" name="publishdate"  class="layui-input" id="test3" placeholder="选择出版时间">
                     </div>

<%--                    <div class="layui-form-mid layui-word-aux">辅助文字</div>--%>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">出版城市</label>
                    <div class="layui-input-block">
                        <select name="city" lay-verify="required">
                            <option value=""></option>
                            <option value="0">北京</option>
                            <option value="1">上海</option>
                            <option value="2">广州</option>
                            <option value="3">深圳</option>
                            <option value="4">杭州</option>
                        </select>
                    </div>
                </div>


                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">书籍简介</label>
                    <div class="layui-input-block">
                        <textarea name="bookresume" placeholder="请输入内容" class="layui-textarea"></textarea>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">书籍类型</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="like[write]" title="文学">
                        <input type="checkbox" name="like[read]" title="教育" checked>
                        <input type="checkbox" name="like[dai]" title="小说">
                        <input type="checkbox" name="like[dai]" title="辅学">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">允许借阅</label>
                    <div class="layui-input-inline">
                        <input type="checkbox" name="switch" lay-skin="switch">
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button type="submit" class="layui-btn layui-btn-blue" lay-submit lay-filter="formDemo">提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        <a href="booksManager.jsp"><button type="reset" class="layui-btn layui-btn-primary">返回</button></a>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="../assets/layui.all.js"></script>
<script>
    var form = layui.form
        ,layer = layui.layer
    layui.use('laydate', function(){
        var laydate = layui.laydate;
//年月选择器
        laydate.render({
            elem: '#test3'
            ,type: 'month'
        })
    })
</script>
</body>
</html>
